<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">

    <title>CDTK</title>


    <link rel="stylesheet" type="text/css" href="{$baseUrl}/media/css/jquery.dataTables.css">
    <link rel="stylesheet" type="text/css" href="{$baseUrl}/css/dataTables.tableTools.css">
    <link rel="stylesheet" type="text/css" href="{$baseUrl}/resources/syntax/shCore.css">
    <link rel="stylesheet" type="text/css" href="{$baseUrl}/resources/demo.css">
    <link rel="stylesheet" type="text/css" href="{$baseUrl}/styles/report.css">
    <link rel="stylesheet" type="text/css" class="init">

    <script type="text/javascript" language="javascript" src="{$baseUrl}/media/js/jquery.js"></script>
    <script type="text/javascript" language="javascript" src="{$baseUrl}/media/js/jquery.dataTables.js"></script>
    <script type="text/javascript" language="javascript" src="{$baseUrl}/js/dataTables.tableTools.js"></script>
    <script type="text/javascript" language="javascript" src="{$baseUrl}/resources/syntax/shCore.js"></script>
    <script type="text/javascript" language="javascript" src="{$baseUrl}/resources/demo.js"></script>

    <script type="text/javascript" language="javascript" class="init">
        {literal}
        $(document).ready(function() {
            $('#example').DataTable( {
                dom: 'T<"clear">lfrtip',
                tableTools: {
                    "sSwfPath": "http://duoc3.ovn.vn/swf/copy_csv_xls_pdf.swf"
                }
            } );
        } );
        {/literal}
    </script>

    <style type="text/css">
        {literal}
        /* this is an intersting idea for this section */
        .example-print {
            display: none;
        }
        @media print {
            .example-screen {
                display: none;
            }
            .example-print {
                display: block;
            }
            thead {
                display:table-header-group;
            }
            tbody {
                display:table-row-group;
            }
            tr {page-break-inside: avoid;}
        }
        {/literal}
    </style>

{strip}


{/strip}

</head>


<body class="dt-example">
<br>
<div class="container">
    <section>
        <div>
            <div>
                <b>{$tencty}</b>
                <br>
                <i>{$diachi}</i>
            </div>
            <p>{$tieude}</p>
            <div class="detail">
                <br>
                Từ ngày: <b>{$tbdau|date_format:"%d/%m/%Y"}</b> đến ngày: <b>{$tkthuc|date_format:"%d/%m/%Y"}</b>
		{$sodong}
            </div>

        </div>
        <div class="example-print">
            <div>
                <b>{$tencty}</b>
                <br>
                <i>{$diachi}</i>
            </div>
            <p>{$tieude}</p>
            <div class="detail">
                <b>Tài khoản: {$loaitk}</b>
                <br>
                Từ ngày: <b>{$tbdau|date_format:"%d/%m/%Y"}</b> đến ngày: <b>{$tkthuc|date_format:"%d/%m/%Y"}</b>
            </div>

        </div>

        <table id="example" class="display" cellspacing="0" width="100%">

            <thead>
	     <tr>
                <th  rowspan="2"> Tài khoản</th>
                <th  colspan="2"> Số dư đầu kỳ </th>
		<th  colspan="2"> Phát sinh trong kỳ </th>
		<th  colspan="2"> Lũy kế từ đầu năm </th>
		<th  colspan="2"> Số dư cuối kỳ </th>


            </tr>
            <tr>
                <th  > NỢ </th>
                <th  > CÓ </th>
		 <th  > NỢ </th>
                <th  > CÓ </th>
		 <th  > NỢ </th>
                <th  > CÓ </th>
		 <th  > NỢ </th>
                <th  > CÓ </th>

            </tr>
            </thead>

            <tfoot>
            <tr>

            </tr>
            </tfoot>
        <tbody>
	
	 <tr >
                    <td >
			{$tc.tk|escape}
                    </td>
		   
		    <td id="sotien">
		    {if $tc.dknovn}
	                  <b>  {$tc.dknovn|number_format:0:",":","} </b>
			{else}
			_
		     {/if}
		     
                    </td>
		    <td id="sotien">
                     {if $tc.dkcovn}
	                    <b>{$tc.dkcovn|number_format:0:",":","}</b>
			{else}
			_
		     {/if}
                    </td>
		    <td id="sotien">
		    {if $tc.psnovn}
	                    <b>{$tc.psnovn|number_format:0:",":","}</b>
			{else}
			_
		     {/if}
		     
                    </td>
		    <td id="sotien">
                     {if $tc.pscovn}
	                    <b>{$tc.pscovn|number_format:0:",":","}</b>
			{else}
			_
		     {/if}
                    </td>
		    <td id="sotien">
		    {if $tc.psnovnlk}
	                    <b>{$tc.psnovnlk|number_format:0:",":","}</b>
			{else}
			_
		     {/if}
		     
                    </td>
		    <td id="sotien">
                     {if $tc.pscovnlk}
	                    <b>{$tc.pscovnlk|number_format:0:",":","}</b>
			{else}
			_
		     {/if}
                    </td>

		    <td id="sotien">
		    {if $tc.cknovn}
	                    <b>{$tc.cknovn|number_format:0:",":","}</b>
			{else}
			_
		     {/if}
		     
                    </td>
		    <td id="sotien">
                     {if $tc.ckcovn}
	                    <b>{$tc.ckcovn|number_format:0:",":","}</b>
			{else}
			_
		     {/if}
                    </td>

		</tr>
		
			
	 {foreach from=$ctkts item=ctkt name=ctkts}
	
                <tr >
                    <td >
			{$ctkt.tk|escape}
                    </td>
		   
		    <td id="sotien">
		    {if $ctkt.dknovn}
	                    {$ctkt.dknovn|number_format:0:",":","}
			{else}
			_
		     {/if}
		     
                    </td>
		    <td id="sotien">
                     {if $ctkt.dkcovn}
	                    {$ctkt.dkcovn|number_format:0:",":","}
			{else}
			_
		     {/if}
                    </td>
		    <td id="sotien">
		    {if $ctkt.psnovn}
	                    {$ctkt.psnovn|number_format:0:",":","}
			{else}
			_
		     {/if}
		     
                    </td>
		    <td id="sotien">
                     {if $ctkt.pscovn}
	                    {$ctkt.pscovn|number_format:0:",":","}
			{else}
			_
		     {/if}
                    </td>
		    <td id="sotien">
		    {if $ctkt.psnovnlk}
	                    {$ctkt.psnovnlk|number_format:0:",":","}
			{else}
			_
		     {/if}
		     
                    </td>
		    <td id="sotien">
                     {if $ctkt.pscovnlk}
	                    {$ctkt.pscovnlk|number_format:0:",":","}
			{else}
			_
		     {/if}
                    </td>
		    <td id="sotien">
		    {if $ctkt.cknovn}
	                    {$ctkt.cknovn|number_format:0:",":","}
			{else}
			_
		     {/if}
		     
                    </td>
		    <td id="sotien">
                     {if $ctkt.ckcovn}
	                    {$ctkt.ckcovn|number_format:0:",":","}
			{else}
			_
		     {/if}
                    </td>
                  
		</tr>
        {/foreach}

    </tbody>
        </table>
        <br>
</body>
</html>